package com.bear.sgg.springboot_06_web.ThreeComponent;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @ClassNmae MyListener
 * @Description 自定义监听器(用于监听应用的运行与结束)
 * @Author bear
 * @Date 2020/3/12 0012 下午 3:27
 */
public class MyListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("contextInitialized.. web启动了");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("contextDestroyed..web结束了");
    }
}
